package com.zzyl.mapper;

import com.zzyl.entity.Resource;
import com.zzyl.vo.MenuVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ResourceMapper {
    /**
     * 列表查询
     * @param bean
     * @return
     */
    List<Resource> list(Resource bean);

    /**
     * 新增菜单
     * @param resource
     */
    void insert(Resource resource);

    /**
     * 查询所有父节点
     * @param
     * @return
     */
    List<Resource> selectByParentNo(@Param("parentResourceNo") String parentResourceNo);

    /**
     * 用户登录
     * @param id
     * @return
     */
    List<String> selectByUserId(Long id);

    /**
     * 动态菜单
     * @param userId
     * @return
     */
    List<MenuVo> selectMenuByUserId(Long userId);
}
